package com.sims.action.manager;

import org.springframework.beans.factory.annotation.Autowired;

import com.sims.bean.Teacher;
import com.sims.service.ManagerService;
import com.sims.util.ActionEnhanced;
import com.sims.util.Constant;

public class AddTeacherAction extends ActionEnhanced {
	private Teacher teacher;

	@Autowired
	ManagerService managerService;
	
	

	public Teacher getTeacher() {
		return teacher;
	}



	public void setTeacher(Teacher teacher) {
		this.teacher = teacher;
	}



	@Override
	public String execute() {
		result = managerService.addTeacher(teacher);
		if (result.containsKey(Constant.SUCCESS))
			return SUCCESS;
		return ERROR;
	}
}
